package com.tang.subject.common.enums;

public enum CorrectEnum {
    RIGHT(1, "正确"),

    WRONG(0, "错误");
    public final Integer code;
    public final String message;

    CorrectEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String of(Integer code) {
        return RIGHT.code.equals(code) ? RIGHT.message : WRONG.message;
    }
}
